/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface;


import Entity.Test;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.table.AbstractTableModel;

/**
 *
 * @author Nghia
 */
public class Model_PatientReport extends AbstractTableModel {

    protected String[] columnNames;
    protected ArrayList employeeList;

    public Model_PatientReport() {
    }

    public Model_PatientReport(String[] columnNames) {
        this.columnNames = columnNames;
    }

    @Override
    public String getColumnName(int i) {
        return columnNames[i];
    }

    @Override
    public Class getColumnClass(int column) {
        switch (column) {
            case 5:
                return Integer.class;
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 6:
            case 7:
            default:
                return String.class;
        }
    }

  /*  @Override
    public void setValueAt(Object value, int row, int column) {
       Employee e = (Employee) employeeList.get(row);
        switch (column) {
            case 0:
                e.setEmployeeID(String.valueOf(value));
            case 1:
                e.setName(String.valueOf(value));
            case 2:
                e.setGender(String.valueOf(value));
            case 3:
                e.setAddress(String.valueOf(value));
            case 4:
                e.setEmail(String.valueOf(value));
            case 5:
                e.setSalary((Integer) value);
            case 6:
                e.setBankID(String.valueOf(value));
            case 7:
                e.setBankName(String.valueOf(value));
            default:
                System.out.println("Invalid index");
        }
        fireTableCellUpdated(row, column);
    }
*/
    @Override
    public int getRowCount() {
        return 3;
    }

    @Override
    public int getColumnCount() {
        return columnNames.length;
    }

    @Override
    public Object getValueAt(int row, int column) {
        switch (column) {
            case 0:
                return 0;
            case 1:
                return 1;
            case 2:
                return 2;
            default:
                return new Object();
        }
        

    }
    

  
}
